/* stylelint-disable font-family-no-missing-generic-family-keyword */
/* stylelint-disable font-family-no-missing-generic-family-keyword */
<!--
 * @Author: lp
 * @Date: 2022-01-07 13:39:57
 * @LastEditTime: 2022-06-20 11:28:32
 * @LastEditors: 瞿旺兴 18774621495@163.com
 * @Description: 登录页面
 * @FilePath: \nien-vue3-admin\src\views\login.vue
-->
<template>
  <div class="login-container">
    <div class="login-row">
      <div class="login-col">
        <img
          src="http://aknien.net:2135/public/html/images/layout/login-bg2.png" 
          srcset="http://aknien.net:2135/public/html/images/layout/login-bg2@2x.png 2x,http://aknien.net:2135/public/html/images/layout/login-bg2@3x.png 3x,
            "
        />
      </div>
      <div class="login-col">
        <div class="login-reset-container">
          <router-view v-slot="{ Component }">
            <transition
              mode="out-in"
              :css="false"
              @before-enter="cssBeforeEnter"
              @enter="enter"
              @leave="leave"
            >
              <component :is="Component" />
            </transition>
          </router-view>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts" name="login">
import 'element-plus/es/components/message/style/css'
// import { ElButton } from 'element-plus'
import { gsap, Linear } from 'gsap'
const cssBeforeEnter = (el, done) => {
  gsap.to(el, { rotationY: 90, ease: Linear.easeNone, duration: 0.5, onComplete: done })
}
const enter = (el, done) => {
  gsap.to(el, { rotationY: 0, ease: Linear.easeNone, duration: 0.5, onComplete: done })
}
const leave = (el, done) => {
  gsap.to(el, { rotationY: 90, ease: Linear.easeNone, duration: 0.5, onComplete: done })
  // gsap.to(el, { rotationY: 360, duration: 0.5, onComplete: done })
}
</script>
<style lang="less" scoped>
:deep(.el-form-item__error) {
  white-space: nowrap;
}
.el-form-item--default {
  margin-bottom: 24px;
}
.login-container {
  background: url("http://aknien.net:2135/public/html/images/layout/bg1@3x.png") fixed;
  background-size: cover;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  line-height: normal;
  .login-row {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    .login-col {
      flex: 1;
      & > img {
        height: 100%;
        width: 100%;
      }
    }
  }
  .login-reset-container {
    display: flex;
    align-items: center;
    height: 100%;
    width: 388px;
    justify-content: center;
    :deep(.el-result) {
      padding-top: 10px;
      .el-result__icon {
        svg {
          width: 82px;
          height: 82px;
        }
      }
      .el-result__title {
        /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
        font-family: PingFangSC-Medium;
        font-weight: 600;
        margin-top: 16px;
      }
      .el-result__extra {
        margin-top: 30px;
        .result-tip {
          margin-top: 8px;
          span {
            color: var(--el-color-primary);
          }
        }
      }
    }
  }
}

</style>
